home *** CD-ROM | disk | FTP | other *** search
/ GFX Sensations 1 / Graphic Sensations - Volume 1.iso / tools / amiga / 3d_tools / irit40s.lha / Irit / inc / ln_sweep.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-02  |  1.2 KB  |  37 lines

  1. /*******************************************************************************
  2. * Line plane sweep algorithm implementation - header file.               *
  3. *                                           *
  4. * Written by:  Gershon Elber                              Ver 1.0, June 1993   *
  5. *******************************************************************************/
  6.  
  7. #ifndef LN_SWEEP_H
  8. #define LN_SWEEP_H
  9.  
  10. #include "irit_sm.h"
  11.  
  12. typedef RealType LsPoint[3];      /* The Z component is pretty much ignored. */
  13.  
  14. typedef struct LsLineSegStruct {
  15.     struct LsLineSegStruct *Pnext;
  16.     LsPoint Pts[2];
  17.     long Id;                /* Lines with unique ID never intersect. */
  18.     VoidPtr PAux;        /* Auxiliary backpointer - not used by ln_sweep. */
  19.     struct LsIntersectStruct *Inters;
  20.     LsPoint _MinVals;                     /* Bounding box on the line */
  21.     LsPoint _MaxVals;
  22.     LsPoint _Vec;             /* A vector from first point to second. */
  23.     RealType _ABC[3];                /* Line equation as Ax + By + C. */
  24. } LsLineSegStruct;
  25.  
  26. typedef struct LsIntersectStruct {
  27.     struct LsIntersectStruct *Pnext;
  28.     RealType t;
  29.     RealType OtherT;
  30.     struct LsLineSegStruct *OtherSeg;
  31.     long Id;                       /* Unique ID of intersection. */
  32. } LsIntersectStruct;
  33.  
  34. void LineSweep(LsLineSegStruct **Lines);
  35.  
  36. #endif /* LN_SWEEP_H */
  37.